#include<bits/stdc++.h>
using namespace std;
int main(){
    freopen("detect.in","r",stdin);
    freopen("detect.out","w",stdout);
    int T,n,m,L,V;
    int d[100],v[100],a[100],p[100];
    cin>>T;
    cin>>n>>m>>L>>V;
    for(int i=0;i<n;i++){
        cin>>d[i]>>v[i]>>a[i];
    }
    for(int i=0;i<m;i++){
        cin>>p[i];
    }
    cout<<3<<' '<<3;
    return 0;
}
